home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1987 June / 1987-06.d64 / ml base demo 2 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  436b  |  17 lines

  1. 10 poke 53280,15:poke 53281,15
  2. 20 if x=1 then goto40:rem flag x prevents reloading in line 20
  3. 30 x=1:load "0:ml base.obj",8,1
  4. 40 input "[147]how many random strings";x
  5. 50 print"[151]"
  6. 60 dim n$(x):nd%=x
  7. 70 fori=1tox:ln=int(rnd(0)*8)+1
  8. 80 fork=1 to ln
  9. 90 n$(i)=n$(i)+chr$(int(rnd(0)*26+65))
  10. 100 next k
  11. 110 print n$(i)+" ";:next i:print
  12. 120 print"sorting in ascending order..[151]":b=ti
  13. 130 poke 828,0:sys49152:sort,a,n$().
  14. 140 b=ti-b
  15. 150 fori=0to x:printn$(i):next:print
  16. 160 print:print"seconds to sort";x;"strings=[157]";b/60
  17.